import request from '@/utils/request';

export async function page(params) {
  return request('/jmonkey/system/role/page', {
    method: 'GET',
    params
  });
}

export async function listAll() {
  return request('/jmonkey/system/role/listAll', {
    method: 'GET',
  });
}

/**
 * save
 * @param {params} params
 * @returns boolean
 */
export async function save(params) {
  return request('/jmonkey/system/role/save', {
    method: 'POST',
    data: params,
  });
}

/**
 * update
 * @param {params} params 
 * @returns boolean
 */
export async function update(params) {
  return request('/jmonkey/system/role/update', {
    method: 'PUT',
    data: params,
  });
}

/**
 * 删除区域信息
 * @param {id} id 区域id
 * @returns boolean
 */
export async function remove(id) {
  return request(`/jmonkey/system/role/remove/${id}`, {
    method: 'DELETE',
  });
}
